package cn.ruihusoft.ql.client;

import cn.ruihusoft.ql.pojo.Response;
import cn.ruihusoft.ql.pojo.dependence.DependenceRequest;
import cn.ruihusoft.ql.pojo.dependence.DependenceResponse;
import cn.ruihusoft.ql.pojo.dependence.UpdateDependenceRequest;
import com.dtflys.forest.annotation.Delete;
import com.dtflys.forest.annotation.Get;
import com.dtflys.forest.annotation.JSONBody;
import com.dtflys.forest.annotation.Post;
import com.dtflys.forest.annotation.Put;
import com.dtflys.forest.annotation.Var;

import java.util.List;

public interface DependenceClient extends BaseAuthClient {

    @Get("/dependencies")
    Response<String> allDependence();

    @Post("/dependencies")
    Response<DependenceResponse> addDependence(@JSONBody List<DependenceRequest> request);

    @Put("/dependencies")
    Response<String> updateDependence(@JSONBody UpdateDependenceRequest request);

    @Delete("/dependencies")
    Response<DependenceResponse> deleteDependence(@JSONBody List<Integer> ids);

    @Get("/dependencies/{id}")
    Response<DependenceResponse> dependenceDetail(@Var("id") Integer id);

    @Delete("/dependencies/force")
    Response<String> forceDeleteDependence(@JSONBody List<Integer> id);

    @Put("/dependencies/reinstall")
    Response<String> reinstall(@JSONBody List<Integer> id);
}
